package servlet;

import java.io.IOException;
import java.io.PrintWriter;


import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.db.conn;

public class orderstatus_Add extends HttpServlet {

	
	public orderstatus_Add() {
		super();
	}


	public void destroy() {
		super.destroy(); 
	}

	//添加订单进度信息
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html;");
		PrintWriter out = response.getWriter();

         //声明数据库操作类
		conn cn = new conn();
	
	    //接收传递过来的值
        String no=request.getParameter("txt_no");
        String omemo=request.getParameter("txt_omemo");
		
		
        String sql="insert into orderstatus(no,omemo,otime) values('"+no+"','"+omemo+"',now())";
        
		


   	
		//执行sql
		cn.update(sql);		

		out.println("<script>");
		out.println("alert('操作成功');");
		out.println("window.location='admin/orderstatus/orderstatus_Add.jsp'");
		out.println("</script>");
	
		out.flush();
		out.close();
	}


	public void init() throws ServletException {
		// Put your code here
	}

}

